diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-24 16:45:29 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-24 16:45:29 +0200 |
commit | ccfe86729e3a454e3fdf529abd7063ceb8fa859f (patch) | |
tree | 0c60dfbc76c1e2c2ba6c71a5201fde18690969f5 /web/pw-server/src/routes/users/[user_name].svelte | |
parent | 33664eff2c93136658b7f863c95e1bfda91141ee (diff) | |
download | planetwars.dev-ccfe86729e3a454e3fdf529abd7063ceb8fa859f.tar.xz planetwars.dev-ccfe86729e3a454e3fdf529abd7063ceb8fa859f.zip |
add bot detail page
Diffstat (limited to 'web/pw-server/src/routes/users/[user_name].svelte')
-rw-r--r-- | web/pw-server/src/routes/users/[user_name].svelte | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/web/pw-server/src/routes/users/[user_name].svelte b/web/pw-server/src/routes/users/[user_name].svelte index fab3a96..a1801f4 100644 --- a/web/pw-server/src/routes/users/[user_name].svelte +++ b/web/pw-server/src/routes/users/[user_name].svelte @@ -1,12 +1,4 @@ <script lang="ts" context="module"> - function fetchJson(url: string): Promise<Response> { - return fetch(url, { - headers: { - "Content-Type": "application/json", - }, - }); - } - export async function load({ params, fetch }) { const userName = params["user_name"]; const userBotsResponse = await fetch(`/api/users/${userName}/bots`); @@ -36,17 +28,17 @@ <h2>Bots</h2> <ul class="bot-list"> {#each bots as bot} - <li class="bot"> - <span class="bot-name">{bot['name']}</span> - </li> + <li class="bot"> + <a class="bot-name" href="/bots/{bot['name']}">{bot["name"]}</a> + </li> {/each} </ul> </div> <style lang="scss"> .container { - min-width: 600px; - max-width: 800px; + width: 800px; + max-width: 80%; margin: 50px auto; } @@ -56,7 +48,7 @@ } .user-name { - margin-bottom: .5em; + margin-bottom: 0.5em; } .bot-list { @@ -75,10 +67,11 @@ .bot-name { font-size: 20px; font-weight: 400; + text-decoration: none; + color: black; } .bot:first-child { border-top: 1px solid $border-color; } - -</style>
\ No newline at end of file +</style> |